package com.sjzl.service;

import java.util.List;


/**
 * 基础服务接口
 * @author 黄健
 * @param <T>
 */
public interface BaseService<T> {
	public T get(Class<T> clazz, int id);
	public void create(T entity);
	public void save(T entity);
	public void delete(T entity);
	public void update(T entity);
	public void saveOrUpdate(T entity);
	public List<T> list(String hql);
	public List<T> list(String hql, Object... params);
	public List<T> list(String hql, int firstResult, int maxResults, Object... params);
	public int getTotalCount(String entityName, String where);
	public List<T> pageDate(String hql, int pageNo, int pageSize);
	public List<T> pageDate(String hql, int pageNo, int pageSize, Object... params);
}
